Log cleanup. Added dump function on DB