added snake_write_text function and prefixed global vars with g_