define function to get file details