Based on your code, I believe your program is failing in the "if then else" after the FIND.
You set a local logical variable to true or false based on the results of the FIND. If the FIND is successful, you make some buffer assignments, if not successful, you also make some other buffer...