lap:two separate threads running for filesaving and streaming