file providers: refactoring