added checks for finding config files, image files and matches