added logging and configuration