default uncaughtException handler needs to check if res.writeHead was already called