Validate file name before open