We can trivially fix this by changing the check:
if os.path.exists(upload_final_location):
to:
if os.path.exists(log_filepath):
We can trivially fix this by changing the check:
if os.path. exists( upload_ final_location) :
to:
if os.path. exists( log_filepath) :