check return code from s3file.py when proceeding to next instruction in am.sh