add logging and fix mis-spelling