Thanks. One more question. Suppose my original H1B expires while I'm on EAD, and I can no longer go back to the original H1B status in case of EB2-NIW rejection, and it may be hard to apply for a new H1B until my new company really takes off. What are my options to retain the ability to work at this point? Could I simply reapply for EAD or keep the EAD if there is another green card application submitted (like EB1 or whatever)?
I am not 100% sure, but I believe that the answer to your last question is "no". With a couple of rare exeptions, you must have a valid non-immigrant status in order to file I-485.
So if your H1B has run out, and after that your I-140 and a concurrently filed I-485 are denied, you will not be able to file another I-485 without leaving the country and reentering in a valid nonimmigrant status first. Basically, once I-485 is denied, if you do not have a valid H1 (or other) nonimmigrant status to fall back upon, you immediately go out of legal status in the U.S. and must leave the country immediately. The only other thing you could do is, if you believe that I-485 was denied improperly, you could file a motion to reopen (MTR) the I-140 and I-485 applications. You'd certainly need a lawyer for that and the chances of it working are usually slim. If the motion to reopen is granted, USCIS will reconsider the denials of the I-140 and I-485 applications although the final decision may still be a denial. While the MTR is pending, and if it is granted, while the reconsideration is taking place, you'll still have legal status in the U.S. If the motion to reopen is denied, you do need to leave immediately and have no other options, short of applying for asylum. I am not sure what effect a motion to reconsider would have on an EAD, but I doubt that you'd be able to use an EAD while MTR is pending.
Also, if I-485 is denied and you do not have a valid nonimmigrant status to fall back upon, you will not, as I understand it, be able to file a petition for a change to another nonimmigrant status, such as another H1B. In that situation, if you find another H1B employer, you'd need to go outside the country and apply for a new visa abroad.
So the bottom line is that unless your I-140 case is very strong and is unlikely to be denied, it is a very bad idea to let your H1B status lapse while I-140/I-485 are pending.