Changed from emptyDirectory to cleanDirectory