Adding missing 'done' statement into pwait.sh