Fix re-entrant errors by not doing any output within the signal handler