Updated StorageManager with some error checking.
MERGE with StorageFun