added additional error checking for -tpr option