Added writing data from microphone to file