add logging and use write for iarc (bug 964311)
Merge pull request #1714 from ngokevin/iarcdebug

add logging and use write for iarc (bug 964311)