Can not read text file from resources

I try read text file from resources folder and receive an exception:

:applicationnew:moeLaunchart I 23317 1962551 /Volumes/SSD/gh-moe-master-1.2.5/aosp/art/runtime/parsed_options.cc:449] setting boot class path to /Users/ibielko/Library/Developer/CoreSimulator/Devices/038A6264-F500-4244-B3BF-B5D42E651DFF/data/Containers/Bundle/Application/658E547D-5AF2-4F69-BE08-A10EF3E45514/applicationnew.app/application.jar:/Users/ibielko/Library/Developer/CoreSimulator/Devices/038A6264-F500-4244-B3BF-B5D42E651DFF/data/Containers/Bundle/Application/658E547D-5AF2-4F69-BE08-A10EF3E45514/applicationnew.app

/Volumes/SSD/gh-moe-master-1.2.5/moe/natj/natj/src/main/native/natj/NatJ.cpp:353 INFO: Method 'boolean java.lang.reflect.Method.isDefault()' is not accessible.
Filepath: /Users/ibielko/Library/Developer/CoreSimulator/Devices/038A6264-F500-4244-B3BF-B5D42E651DFF/data/Containers/Bundle/Application/658E547D-5AF2-4F69-BE08-A10EF3E45514/applicationnew.app/hosts.json
System 5 A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
System 5 java.lang.Throwable: Explicit termination method 'close' not called
	at dalvik.system.CloseGuard.open(CloseGuard.java:180)
	at java.io.FileInputStream.<init>(FileInputStream.java:78)
	at java.io.FileInputStream.<init>(FileInputStream.java:103)
	at com.company.factories.impl.IOSNativeUtilityFactory.openAssetStream(IOSNativeUtilityFactory.java:141)
	at com.company.utils.FileUtils.openAssetStream(FileUtils.java:23)
	at com.company.config.antiblocking.AntiBlockingDnsConfig.readEmbeddedConfig(AntiBlockingDnsConfig.java:48)
	at com.company.app.BaseApplicationController.initialize(BaseApplicationController.java:88)
	at com.company.app.WhiteLabelApplicationDelegate.onApplicationCreated(WhiteLabelApplicationDelegate.java:46)

Here is code:

    public InputStream openAssetStream(String fileName) {
        InputStream inputStream = null;
        try {
            // Forming path to config file
            final String filePath = getLocalConfigPath(fileName);

            // Try to load data from file
            System.out.println("Filepath: " + filePath);
            inputStream = new FileInputStream(filePath);
        } catch (FileNotFoundException e) {
            if (log.isLoggableE())
                log.e(e.toString());
        }
        return inputStream;
    }

File is contained in path, I have checked.
Resources were copied by gradle script:

sourceSets {
    main {
        resources {
            srcDirs('resources-qa',
                    'resources/assets')
        }
    }
}

Thank you

Dear Ivan Bielko,

this is just a warning that the FileInputStream was not closed.

Best Regards,
Kristóf

I added calling of close method and everything works fine.
Thank you