Extracted notification and added logging