Added logging. Note: plugin doesn't create table for log yet