Catch file errors. And print everything to stdout/stderr.