Imroved Code - Select File functionality added