Do not import GUI and plotting modules in the batch mode. See #3.
Report progress to stderr to avoid buffering.