fixed Node JS exception handler