added output of error-message to main of test.c