Edited logging functionality