Catch peek trying to read a closed file