added logging to file, hopefully