improve custom configuration loading:
- Add a callback for async loading.
- Allow other environment than all, development and production
- Configuration logic is let to the user.