Ensure closing fram have always status and message
Added after attached/detached hooks
Added some debuging info