IOError patch
merging juesato's files