Fixed generation complete message printing before actual completion
Rewritten example 13