creating MPI error handler
added MPI error handling