add function to cretate a new file if file does not exist