- made file param required and check to make sure it is a file