Data logger

I found this. Is it possible to save as .csv to a usb storage device instead of root directory? Is it also possible to put an 'If" statement in there saying if the distance of the msg is < .3 nm then log it and ignore the rest?

https://discussions.flightaware.com/t/how-to-log-dump1090-output-to-file-on-pi/17710