Implmented check_optput withinthe module to work with python 2.6