improve catch errors and compare application name in lowercase