Make sendHeader() and sendErrorMessage() return status, log