Catch IOError in link()