print file/dir name in the current directory before leaving each function