Formated Errors, fixed an error catching bug