Added support for file storage (not optimal, but working)