moved logging stuff out of options