No output when using "start-transcript"

Hi there,

I’m new to universal dashboard and i’m stuck with something.
I want to use the API functionality that calls a remote script and then runs a specific function in that script. When i use “start-transcript” for logging purposes, the function stops and returns “Transcript started, output file is …\path_to_logfile”. When i comment the “start-transcript” part, i receive the results i need. I use the following, where “validate-user” is the function of the script called:

$Endpoint = New-UDEndpoint -Url “/process” -Method “POST” -Endpoint {

 $Parameters = $Body | ConvertFrom-Json
 . "path_to_script"   
 $usr_conf = validate-user $Parameters.EmailAddress    
 return $usr_conf 


Start-UDRestApi -port 1001 -Endpoint $Endpoint -AuthenticationMethod @($FormLogin, $auth2)

When i run the function outside of the Endpoint, it works correctly.
Does anyone have a clue why this is happening?

Thx in advance

Problem has been solved… Start-transcript returns that string. Starting it with “start-transcript | out-null” resolved the issue.