So sorry for not coming back to this, I was truly stupid, the file contains newline character ('\n'), I was not aware of this since print() would not show this