Added accession as parameter and fixed the exit status.