Write the main process and some progress output.