Checking the file size seems a little redundant. Checking the magic number should suffice.