add gadget logger

write gadget output in a file

close #61 
close #35 
i think this can we do in an another pull request.