Better error handling in 'cot deploy'