Added custom log functionality