Good fix with passing data to thread. Error logging still to be done, and CGI