Added logging and configuration