adding global bool to handle reading/writing the fifo file