This line contains:
pth_path = 'pth//'+ current_time
I think this should be replaced by:
pth_path = opt.pth_path+'//'+ current_time
So that if the user changes the option --pth_path then it takes effect here. Otherwise, I get a FileNotFound error in this line.