Parameterize output file, make input a little more flexible on topic naming.