added whitespace triming to key file read