Added working error messages for the addAnalysis function.