Check engine light staying on. Code31&41

I have 91 pickup 22re. When code 31&41 hit me it made it run bad and now fuel pump will only work if I put a ground wire on green &yellow wire going into the open relay.

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0

crwdns2944067:02crwdne2944067:0:

31 is vacuum sensor signal

41 is throttle position sensor signal

Im not sure how these are related to the fuel pump issue.

crwdns2934271:0crwdnd2934271:0crwdne2934271:0

well thats what is going on. I have to ground my yellow green wire to my relay to get fuel pump to wotk. Its runs bad. 31&41 are still there. O need some help on this please

crwdns2934271:0crwdnd2934271:0crwdne2934271:0

crwdns2934285:0crwdne2934285:0