Added error control to the keystone creator