Add clean_up_and_append_file method