Fix bug where it tries to record lines that are all whitespace