Merge "Close file on exception as well" into ics-mr1