new version accepting directory conf

Signed-off-by: Frederic Descamps <lefred.descamps@gmail.com>