Milestone:new writeCube function tested successfully
Removed old writeCube function