move copy system folder to an earlier stage as it can lead to some deps not being packed