run() now has a flag to make file writing optional.