Line 51: flielist_fp = open(args.filelist_path, 'w') flielist_fp should be filelist_fp
Line 51: flielist_fp = open(args.filelist_path, 'w')
flielist_fp should be filelist_fp