Updated logging functionality and added negation