Fixed bugs on files