Added additional error feedback on invalid keys