Changed a few things about error reporting