delete lock-file correctly