Fixed bugs in File