alc.sh: Add some error handlings