Use temporary files as intermediate step