Fmriprep freesurfer longitudinal processing issues

I’ve been having some issues while trying to run fmriprep on a longitudinal dataset. The main issue is that whenever I try to run fmriprep, I keep getting the same crashlog. The output file says

Node fsdir failed to run on host n044.

When I look at the crash logs this is what is produced

FileExistsError: [Errno 17] File exists: '/projects/.../BIDS_data/derivatives/freesurfer/fsaverage5'

We originally ran freesurfer before running fmriprep, so I tried removing the freesurfer directory entirely and the same error is still produced. Additionally, we’ve tried running fmriprep with and without the --longitudinal flag but still get the same error. Has anyone had this error or have any idea why this might be happening?

Thanks in advance!