Error logging fixed. Update JsDoc