cleaned up unused imports
added support for complex (container, osgi) environments
changed RAF to writer so the file is human readable