working on sync files with db