i need to rewrite the chat check file portion :(