Converted file loader to be promise-based.