added string trimming to logger