Added thkpermissions & thkpermissions.check