Saving the mosaic to disk code