Updated readWriteThread.c file