Test case modify_file method