Fix type that change the logic of the script when no previous log is found; my bad