-Added logging