migration tool add method to write in a file