move trimStackTrace import to where it is called