Adding a numKeepArtifacts parameter to be able to keep X artifacts per directory structure