Added check permissions
Added docs