Ed: Check existence of some columns

It was crashing when there was extra lines at the end of a file.