Added robustness to badly formatted lines in file

removes empty key in look ups
Skips unexpectedly formatted lines