Added a logging framework and fixed test script to handle additional output.