try/catch for images