resultsDirectory set to null if results logging not enabled