Improved stderr handling.