add test for file path changing and fix path changing