Under some error conditions files are not closed, and the close guard will complain. Bug: 18603475 (cherry picked from commit d97465c3) Change-Id: I7155e3f4f6231844edd375b9302ecf1ba8079950