Almost correct version (it prints two \n instead of nothing in ignore mode