Build improvements and Error handling