add web interface
fix crash when server goes down
recording, stats logging