Factor out file store