added code to generate temporary coordinate file