Don't catch the NULL earlier, because we do want an error message when opening the lockfile fails.
Attach a file by drag & drop or click to upload