add logging statement when there's an unexpected error during build
Merge pull request #734 from dimagi/log-unexpected-error

add logging statement when there's an unexpected error during build