print error details in the console