properly end input data list
add -i and -f for save in-place