pop dirs and display visited dirs and files