Add more logging, fix demo window resetting socket needlessly