You should be able to replace these three lines with just `checkExistingDirectory = new Q();`