This will add the line specified with a line break at end above any empty lines in file.

I used this in our ant build