convert object to string before debugging