fixing file parsing