public static InputStream getFileInputStream(String pathToFile) {

        if (Game.isRunningInIdea()) {
            try {
                return new FileInputStream("src/main/resources/" + pathToFile);//FileUtils.class.getClassLoader().getResourceAsStream(pathToFile);
            } catch (Exception e) {
                try {
                    return new FileInputStream("src/test/resources/" + pathToFile);
                } catch (FileNotFoundException e1) {
                    Console.log("File " + pathToFile + " could not be loaded");
                }
            }
        } else {
            try {
                return new FileInputStream(pathToFile);
            } catch (FileNotFoundException e) {
                Console.log("File " + pathToFile + " could not be loaded");
            }
        }

        return null;
    };