CG-2786: Added functions to log any php errors