workflow for logging errors