Use data on SD card for controlling a servomotor

Have you considered storing your code in binary instead of text it would simplify this a lot.