add -f parameter for reading and writing results to files