improved debugger on handling unreadable files

issue #3494