Configure IntelliJ to print the standard output in the console window but also save it to file
This feature is available starting from IntelliJ IDEA 11:
This feature does work in IDEA 14.1.1. Also in Run/Debug configuration.
The writing occurs after the run finishes.