added check to make sure user enters a path/filename