fixed exit cond
added delay option
renamed fifo file