reset logmessage for every loop in parsing files