changed call exit(-1) to stop 1 to comply with standard fortran 2003