Add new catch exception and fixing bug with sys.stderr output parameters