Add asserts for file modification