separating file and db