Fixed bug for files with no newlines.