Added some logging changes.
Restrict number of lines of log to show.