Added newline to input data, so it works with files not ending in newline