fixed error when file has no bytes e.g. .localised on os/x