Only convert XML to mat on first run