get filename as argument and save output based on that