Added support for threads and added flag to suppress deprecated string conversion errors