Add filename checking.