Server is working properly now and  responds well to SIGHUP signal