IOExceptions & other fixes.