Scene file write fix