add gadget logger

write gadget output in a file

close #61 
close #35 
done