fix imports for helper_functions and write_files

apply try/except Import error pattern to helper_functions and write_files imports