Adding file parsing function