set correct file name in header
print error messages from subprocesses