fixed file-moving bug