Removing duplicate error logging.