Mutex ad hoc stream objects; fix file extension detection.