added logging and server fork