Optimizing file storage