Serial Monitor and sd card values are not the same

int solenoidPin = 4;You gave the pin a nice name.
Why don't you use it?