Fixed filestorage replace/store functions;