move if statement  inside the done() handler of ProjectManager.refreshFileTree() to avoid the duplicate path to call to refreshFileTree()