try not to trap IO exceptions