Check memory after malloc
Print cairo and cairo surface status if not success