fixed bug in fifo code where the bash script and matlab both watched and wrote to the log causing a race condition