add gadget logger

write gadget output in a file