add check for invalid mailbox path