I/O is more expensive than catching an exception