added file output for position data