experimental implementation of listing contents of the given directory