switched from os.execl to os.spawnl with wait to ensure the finally of the pyton script will run.