Added some error checking on simpGen