added logging to file