Slight cleanup of errorHandler