Change from fscanf to more flexible approach using strtok