FWR firmware loader: move firmwareLength closer to use