proper error handling in file size retrieval, patch by Ronald S. Bultje rbultje at...