add gadget logger

write gadget output in a file

close #61 
close #35 
Log file location is "calculated" in two places currently. Is there an easy way to extract this logic so we don't have duplicate code?