put in logging for error