What if the csv_file does not exist for some reason? You can use naarad.utils.is_valid_file(filename) which checks for both cases