added nthreads to logging
updated errors with debug io locks
cleaned up error logging