rework file store to allow for database store