Set curl timeout in both functions