better error handling form Mojo::IOLoop::Stream