add regex checking for files