Implemented error catching from gfortran compiler