class PropertiesUtils {

    public static File findFile(String filename) throws FileNotFoundException {
        // First try as full path
        File file = new File(filename);
        try {
            if (!file.exists()) {
                // Second try using VitamConfigFolder
                file = fileFromConfigFolder(filename);
                if (!file.exists()) {
                    // Third try using Resources
                    file = getResourceFile(filename);
                }

            }
        } catch (final FileNotFoundException e) {
            // need to rewrite the exception
            SysErrLogger.FAKE_LOGGER.ignoreLog(e);
            throw new FileNotFoundException("File not found: " + filename);
        }
        if (!file.exists()) {
            throw new FileNotFoundException("File not found: " + filename);
        }
        return file;
    }

    private  PropertiesUtils();

}