- close stderr on app startup
- fixed shutdown after app timeout