Modified Partition Functions, Consistent Anomalies and Consistent Schwinger Terms