added logging module; moved file init to module