Fix output: print content to stdout and return exit code.