added logging to a file..