commit db after each file