added CustomLabel functionality

the script should now handle all possible file types