Refactored code. env() is an attribute
Fix unlink
Default STDERR logging goes to app log