some printed log removed, changed
Request handler now should take care of stopping signal
ResulCode should now be explicitly set
output channel is now not buffered