fixes, debug messages, lock file