print error, if there is an error