#53: Improved error message for missing source encoding and environment cleanup.