fix last line position; save in a suffixed file