Update error messages and print error