direct scan to a file