added onContentPrepare event with debug