Fixed logging issue (by making it synchronous). Added process exit handling for server.
Removed erroneous change from tests