Tesla gears up to launch the Model 3

Tesla is losing more money than expected as it nears the launch of its first mass market car.

On Wednesday, Tesla (TSLA) reported a loss of $330 million for the first three months of the year, far exceeding Wall Street’s estimates and up from $282 million a year earlier.

The larger loss comes even as Tesla reported strong sales for the quarter. It posted revenue of $2.7 billion, more than double from a year earlier, fueled by shipping a record 25,051 cars.

Tesla is spending heavily ahead of the Model 3 launch, which it says is still on track to start production in July.

“As part of our Model 3 launch preparations, we are significantly expanding our infrastructure to support Tesla owners,” the company wrote in a letter to shareholders Wednesday.

Related: Tesla just became the most valuable carmaker in America

That includes plans for 100 more retail, delivery and service locations globally as well as opening Tesla’s first body repair shops. Tesla also reiterated plans to “at least” double the number of charging stations.

Tesla says it expects to be able to support production of 5,000 Model 3 cars a week this year and 10,000 a week next year. But the company also admitted to some unpredictability as it gears up for the launch.

“Given that we will be ramping Model 3 production so quickly… even a couple-week shift in timing can have a meaningful impact on total deliveries,” the company wrote in its shareholder letter.

Tesla’s stock has soared this year on optimism for the Model 3, pushing its market cap above older car companies like Ford (F) and General Motors (GM). But some analysts are sounding a cautionary note.

“In this climate of low fuel prices, an administration that favors less stringent environmental controls and a market proliferation of full-electric offerings from mainstream manufacturers, the launch might be a difficult one,” Jack Nerad, executive editorial director at Kelley Blue Book, said in a statement.