Try to avoid using locks in printstring/string functions where possible