error logging, getting other stuff working