changing FileNotFoundError to IOError, for python 3.2 compatibility