fix mode for file