Added more checks
Fixed issue in generating deb package names