Scan for magic number if needed.