Cleaning up files and adding a fix for the lock file