Changed to Handle Bad Masked files which it couldnt do before