made watchdog and upload functions for efficient