switch to a cache of uploaded keys instead of checking on ksm
fix warnings