Adding warning message and shake detection