Fix handling of failed builds when waiting for them to complete
Version 0.4.0