use os.devnull for python2 support