Added versioning to reposrtError function