I see that we already use magic bytes to determine the filetype. I'll change that here.