return correct status code so that frontend can react when the files were
downloaded