using trim function for log checking