Logging more errors and putting a general error messsage to the console.