Fixed "can't read file" message to use the correct variable.