log unknown errors. closes #587
clean up code for #587 close