#106 added listener and identification of directory.