Added some error exceptions