perf: fix when running with TEST_OUTPUT_DIRECTORY