catch exception in htpasswd