fixing di container, no setter and write function for file handler