Adding try catch for PIXMAP