added test for read , write(int) and newLine