Bug fix for last line from metadata file being read twice