read key instead of generate when it already exists