Add condition to converting cat script