Fix the logic for lshell logs rotation.