Able to figure out how to avoid reading the whole file twice and instead read the last 16 bytes then do the logic/structure/MD5 checking while only reading the file once.