Since $USER_DATA is now in a file you can head -n 1 $TMP instead, either that or $USER_DATA needs quotes.