work on fixing exception and exit code handling, make a devnull filehandle