filename SHOULD be table name and directory SHOULD be database name