PreviousBuildDirError logging and test fix