Added some writing to cout.