Added logging and scheduler class