halt on build error

This fixes one issue in #18.