Changed the logging to be more descriptive about where the error is