added some functions in fileIO and took away some variables in rig.py