Fix filename issue when using -i.