Added user directory listing with conditional check