#47: error handler added to handle php errors (stopping execution if happened)