Fixed a condition and removed some warnings in File module