implementing target filename check