is there any reason for using `realpath` here and not for other outputDir ?