fixed file update logic?