Better permission and naming for outfiles