Also catching IOError Permission denied (and any other exception actually)