Update bin/crypt with better error handling