throwing and catching IOExceptions