fixed/added error messages to the console