safer file return