Added removal of console messages before exporting.