Added usage logging functionality