Added error reporitng.