Logging and npes enhancement