added libkey check