fix and improve server side logging