Fix IOerror catch problem, ref issue #15