Updated so that client will create output folder if it does not exist