[lib] only use pem if found