Fixed check if keyFile is set