Add error handling for app.listen()

Also take the async behavior of app.listen() into
account.
Merge pull request #1 from nebulon1234/master

Add error handling for app.listen()