Refactored file storage