file->fp = fopen(file->path->str, mode);
if (!file->fp) {
BT_LOGE("Cannot open file \"%s\" with mode \"%s\": %s",
file->fp = fopen(file->path->str, mode);
if (!file->fp) {
BT_LOGE("Cannot open file \"%s\" with mode \"%s\": %s",
if (fstat(fileno(file->fp), &stat)) {
BT_LOGE("Cannot get file information: %s", strerror(errno));
if (fstat(fileno(file->fp), &stat)) {
BT_LOGE("Cannot get file information: %s", strerror(errno));