Add dims to metadata + update filename in metadata.