added search for directories if no markdown file is found