Update Process_upload.py

Adding the check for the flagfile