added error message to doAdd like in doUpdate for caught php errors