It still doesn't work for some reason, can you explain how your code works, I don't get the -1 and how you used the $read identifier.