categorizing logs by files &printf2