Updated code to open file using Command Line