Preventing some exceptions.

Reverting changes at FileHelper.java.