Add npc_data directory and error logging bugfix