update readImg with try