Fix file loader to use promises.