fix logfile initialization
refactored wrappers