Added logger, made it possible to deamonize the collector