Sketch stops printing after writing a few times
What you see is undefined behavior. You define your buffer to have a length of 50 bytes:


  char buffer[50];


This is too short for most of the strings you want copy into it and you will thus overwrite other variables.

The simplest solution is to increase the buffer size so that the longest string fits (e.g. 150). You will see that it then works as you expect. Take a look at http://linux.dd.com.au/wiki/Arduino_Static_Strings for hints how to avoid wasting RAM for the buffer.