fixed 0 byte length file error