Text this: Balancing energy recovery and direct greenhouse gas emissions in wastewater treatment