adding directory duplication check