script to find if a camera is valid or not