fp/add: add_directories method now writes to file