Added delay to ensure wifi is connected