fix console path display for './'; refactor