added logging setup
updated logging

now saves the log so it doesn't disappear. needs testing.