Changed log function. Optimization.
Fixed bug with dumping object.