readLine method in RAFUtil now reads by bytes, not using readLine