refactor checkit imagefilp function existance