Adding a tiny bit of error logging.