tests: Improve output messages in case of error