added print notes to EOFfn for debugging
changed lon,lat within if/else loops to try and solve EOF writing issue - doesn't seem to be working. check on PC