Add debug log method.
Fix some methods that have variable arguments.