errors printed instead of result

Also:
added tests for prefix line
added test for error checking