A magic number mismatch error is seen when the IOS image is corrupted or a .tar file is uploaded through an x-modem. To resolve the issue, you will have to upload the .bin file to the switch through the x-modem.
Make sure that the file you are booting is the right one and it's not corrupted.
You can check the recovery procedure at the following links:
We are pleased to announce availability of Beta software for 16.6.3. 16.6.3 will be the second rebuild on the 16.6 release train targeted towards Catalyst 9500/9400/9300/3850/3650 switching platforms. We are looking for early feedback from custome...