Implemented log file renaming and pruning