Improve codegeneration log, specially when there are failures

Change-Id: I05d9c6c3e43ee6c1daf9c9e1b61be6cc5a82b31d