Fix bug where a single new line would make it error
Always use const char when fetching lines