don't remove lockfile unless build finishes without errors