Changed read function to be more stable, added debugger, not to start DFS.