Merge "Redirect output to file ASAP, otherwise printf() calls might be missed."