Add trimming to read parsing according to metadata