allow optional out_dir and read it from config file