Fixed lock file and autoloading.
Fixed chmod