I understand that this code actually does not do any IO, but ignoring exceptions, still looks bad.