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