Add function write_to_file to avoid redundancy in writing to file, and modify bootstrap functions accordingly
Add function write_to_file to avoid redundancy in writing to file, and modify bootstrap functions accordingly

weecology/mete-energy,weecology/mete-energy