Check a file has security context before updating it