Previewing mesh before instantiating

I’m trying to instantiate an object where a raycast hits and I already got that working but now I want to preview it before placing it. I’ve seen different posts saying that I have to instantiate the preview mesh as well, but I can’t seem to instantiate it only once and make it follow the raycast end point.

 bool IsBuilding;
    [SerializeField]
    private GameObject previewMesh;
    [SerializeField]
    private GameObject actualMesh;
    [SerializeField]
    private Camera camera;
    private Vector3 origin;
    private Vector3 direction;

    // Use this for initialization
    void Start () {
        IsBuilding = false;
    }
	
    private void FixedUpdate()
    {
        origin = camera.transform.position;
        direction = camera.transform.forward;

        if (Input.GetKeyUp(KeyCode.Mouse2) && IsBuilding == false)
        {
            ActivateBuildMode();
            
        }
        else if (Input.GetKeyUp(KeyCode.Mouse2) && IsBuilding == true)
        {
            DeactivateBuildMode();
        }

        if (IsBuilding == true)
        {
            RaycastHit hit;

            if (Physics.Raycast(origin, direction, out hit, 150) && hit.collider.tag == "Finish")
            {   
                Instantiate(previewMesh, hit.point, hit.transform.rotation);   
                Debug.DrawRay(origin, direction, Color.red);
                if (Input.GetKeyUp(KeyCode.Mouse0))
                {
                    Instantiate(actualMesh, hit.point, hit.transform.rotation);
                }
            }
        }
        
    }

    void ActivateBuildMode()
    {
        IsBuilding = true;
        Debug.Log("Build Mode Activated");
    }

    void DeactivateBuildMode()
    {
        IsBuilding = false;
        Debug.Log("Build Mode Deactivated");
    }
}

Solved it. Basically created a new boolean and defined the preview mesh in a game object. When I enter build mode it creates the preview mesh and changes the bool, and then I update the instantiated mesh’s position.
bool IsBuilding;
[SerializeField]
private GameObject previewMesh;
[SerializeField]
private GameObject actualMesh;
[SerializeField]
private Camera camera;
private Vector3 origin;
private Vector3 direction;
bool isCreated = false;
GameObject preview;

    // Use this for initialization
    void Start () {
        IsBuilding = false;
    }
	
    private void FixedUpdate()
    {
        origin = camera.transform.position;
        direction = camera.transform.forward;

        if (Input.GetKeyUp(KeyCode.Mouse2) && IsBuilding == false)
        {
            ActivateBuildMode();
            
        }
        else if (Input.GetKeyUp(KeyCode.Mouse2) && IsBuilding == true)
        {
            DeactivateBuildMode();
        }

        if (IsBuilding == true)
        {
            RaycastHit hit;

            if (Physics.Raycast(origin, direction, out hit, 150) && hit.collider.tag == "Finish")
            {   
                if(isCreated == false)
                {
                    preview = Instantiate(previewMesh, hit.point, hit.transform.rotation);
                    isCreated = true;
                }
                
                preview.transform.position = hit.point;
                Debug.DrawRay(origin, direction, Color.red);
                if (Input.GetKeyUp(KeyCode.Mouse0))
                {
                    Instantiate(actualMesh, hit.point, hit.transform.rotation);
                    Destroy(previewMesh);
                }
            }
        }
        
    }

    void ActivateBuildMode()
    {
        IsBuilding = true;
        Debug.Log("Build Mode Activated");
    }

    void DeactivateBuildMode()
    {
        IsBuilding = false;
        Debug.Log("Build Mode Deactivated");
    }
}