Added possibillty to specify an directory as argument