added checking for file supplement