Don't use error to print error message, they won't end up in the .out file.