Moved the unlocking of the network mutex to inside the if where it's
being locked. Made the debug message of the filter function a bit more
explicit.