Added error handlings.