New member to the forum, although I have been creeping around the site for quite some time. I have a 2008 H3 with the i5.

Couple of days ago my wife and I were out shopping and my check engine light came on. I happened to be passing by an Autozone and stopped in and got them run the codes on it. Although the kid didn't tell me the exact code, he said it was a camshaft position sensor and said possibly causes were low oil, dirty oil, or issues with timing chain. After a little research, I think the code was either p0014,16,or17. I checked my oil and it was strangely enough a little lower than normal. I added a couple quarts of oil and disconnected the battery and drove around a bit to see if the light would come back on. It did not. So i was assuming it was just a low oil issue and scheduled an oil change for this week. (I am capable of changing my own oil. lol. However the bi-laws at our condo do not allow car servicing on the properties...) Anyway, I get to work this morning and notice the ole gal is dropping a good bit of oil. So i rushed over to my mechanic and he said the rear main seal had a sever leak and would be about a $14-1500 fix. He ran the codes and although the light wasn't on the camshaft code did come up as well.

My question i suppose would be do any of you experts on here suspect the code was just a result of the leak that turned into a gusher today? Or are these really not related? Its probably informative to add that I have not experienced any terribly rough idling or reduced performance as I have seen other people describe with this code. My main concern is kbb only values my car at 8k for a private sale. And after a 1500 dollar investment im down to 6500. If i could actually get that. She have 160k miles and up until now has ran like a top. I'm fairly easy on her with just an occasional trail ride. Nothing any worse than an old county road though. I just don't want to spend the 1500 to only find out that I have to replace a motor or even another 3000 dollar ticket item. At that rate, I would just sell for parts and buy this alpha i found. Any thoughts? Thanks for helping out a noob.