Change try' to catch only IOExceptions