When trying to record sound arecord produces a huge amount of useless files, only the first one in the chain has sound. Other thing is that program don't exit when duration of recording is expired. I'm afraid that our arecord has some kind of bug... tested the same program under Rpi where it works well
here is test instruction
cd /tmp
arecord -f cd -d 5 tt.wav
instruction means : record in cd quality duration of 5 seconds