package com.github.kokorin.jaffree;

import java.nio.file.Path;
import java.nio.file.Paths;

public class Config {
    public static final Path FFMPEG_BIN = initFfmegBin();

    private static Path initFfmegBin() {
        String ffmpegHome = System.getProperty("FFMPEG_BIN");
        if (ffmpegHome != null) {
            System.out.println("Using FFMPEG_BIN from system property: '" + ffmpegHome + "'");
            return Paths.get(ffmpegHome);
        }
        ffmpegHome = System.getenv("FFMPEG_BIN");
        if (ffmpegHome != null) {
            System.out.println("Using FFMPEG_BIN from environment variable: '" + ffmpegHome + "'");
            return Paths.get(ffmpegHome);
        } else {
            System.out.println("FFMPEG_BIN not configured: expecting to find ffmpeg on PATH");
            return null;
        }
    }
}

@@ -30,16 +30,74 @@
 ffree;%0A%0A
+import org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0A
 import j
@@ -166,16 +166,96 @@
 onfig %7B%0A
+    private static final Logger LOGGER = LoggerFactory.getLogger(Config.class);%0A
     publ
@@ -288,23 +288,23 @@
 G_BIN = 
-ini
+ge
 tFfm
+p
 egBin();
@@ -333,15 +333,15 @@
 ath 
-ini
+ge
 tFfm
+p
 egBi
@@ -454,34 +454,27 @@
         
-System.out.println
+LOGGER.info
 (%22Using 
@@ -506,20 +506,20 @@
 operty: 
-'%22 +
+%7B%7D%22,
  ffmpegH
@@ -513,38 +513,32 @@
  %7B%7D%22, ffmpegHome
- + %22'%22
 );%0A            r
@@ -572,24 +572,25 @@
 ;%0A        %7D%0A
+%0A
         ffmp
@@ -673,34 +673,27 @@
         
-System.out.println
+LOGGER.info
 (%22Using 
@@ -734,12 +734,12 @@
 le: 
-'%22 +
+%7B%7D%22,
  ffm
@@ -749,14 +749,8 @@
 Home
- + %22'%22
 );%0A 
@@ -803,45 +803,28 @@
    %7D
- else %7B%0A            System.out.printl
+%0A%0A        LOGGER.war
 n(%22F
@@ -889,28 +889,24 @@
 %22);%0A        
-    
 return null;
@@ -906,26 +906,16 @@
 n null;%0A
-        %7D%0A
     %7D%0A%7D%0A

Fix after review.