added & fixed libkey check for basic functionality