added error codes to the output, fixes #60