When your I-140 is denied, you may appeal the decision if you believe it is wrong. If you have used EAD and the I-140 is denied, you are out of status and you will need to apply H-1/4 visa at a consulate.