Improved error handling

Makes buildpack errors easier to spot and debug