checking for APCu instead of try catch blocks