fixed notices in database
added Output::jsonError()