Fixed output directory issue