added error message on build fail

This replaces pull #1275