now passing correct list of files and mime type for directory listing