Added an output to test.
Fixed errors