Working on error logging.