get key file from secret