fixing loading files errors