read and open the file using exec function