factored out file manipulation code into file_helpers.py
factored out file manipulation code into file_helpers.py