Added output path checking