Fixed some un-mutex-protected accesses to device->file_queue