write logs.