added licence, extracted debug log