Server: Fixed struct bug and initial file or dir check