proper output path handling