     // Expect the transaction file as unparsed argument (not matched by flag);
     // only one transaction file is expected.
     guard cli.unparsedArguments.count == 1 else {
-        print("Specify exactly one transaction file argument");
+        print("Specify exactly one transaction file argument", to: &errStream)
         exit(EX_USAGE)
     }
     guard let data = try? Data(contentsOf: URL(fileURLWithPath: cli.unparsedArguments[0])) else {
-        print("Could not read transactions file")
+        print("Could not read transactions file", to: &errStream)
         exit(1)
     }
     inputCSV = data

        let csv = note.substring(from: note.index(note.startIndex, offsetBy: 6))
        guard let row = (try? CSV.parse(csv.data(using: .utf8)!))?.first else { continue }
        guard row.count >= minimalColumnCount else {
            print(transaction)
            print("Found a transaction with \(row.count) columns, at least \(minimalColumnCount) expected")
            continue
        }
        let tokens = extractTokens(row: row)


for row in rows {
    guard row.count >= minimalColumnCount else {
        print("Found a row with \(row.count) columns, at least \(minimalColumnCount) expected", to: &errStream)
        exit(1)
    }
    let tokens = extractTokens(row: row)
