Changed path and log level
Refactor var names
Refectored following J.F. Sebastian using generators