fix an issue where if passing the private key by file name two-factor does not work