Fixed bugs in file storage wrapper