Wrap in try/except for IOError