Updated screenshot handling