Lock will not lock when key is operated
Check cam on cylinder is correct. Is the hub setting correct?

Woodchips or metal filings in lock case
Locks are supplied with cylinder covers fitted. If these are removed and the lock exposed to debris, problems can occur.

Difficulty in locking a lock set to anti-lock-out function
Incorrect alignment of the strike plate, preventing the latch from fully throwing will make it difficult or impossible to lock the lock.