Fix scanner test
Write to intermediate file