Added error control at main function