handle log file numbering properly