update file db and modify getData for fetching data