added output dir and fixed subs