minor edits. Refactor the printing of search path