Detect read only file