add support for out directory setting