Check for 0 byte length files and handle correctly