Fix version file problems, fix console window not being destroyed