Error catching for 500,502 errors, also adding space for rows in advance to dodge a heisenbug