read file dimensions