Added error exception printing.