Add error handling for server.listen() (close #315)