indexing now works for files with no header lines (beginning with #)