Add logging and config