Adding checks on return value in FileTraverser.

Change-Id: I5215ed8753bfcd4f7245933e24f9e02090b815de