use ```with open(out_fp, 'w') as outfile:``` context management