add check on directory