catching keyerror for locking host if the host is filtered or unknown