Refactorization and adding of LogActivity