updated to accept keystore when using simple configuration