let sm display it's own logging messages (unless it's properly nested)
improved prepare_local and docs