Gracefully handle various io exceptions in "foundations.io" module.