Turn some debug statements into trace
Self made scoped lock did not work at all