Addded Loop and Write to Console.

Signed-off-by: Paul Sparkes <paul@objectivedesign.co.uk>