update file & directory