Implemented Flash mode with auto on and off