Added try/except block in io_lib to fix github issue #2