added logging of file