fixed file interacting bugs