Added write only and table name option and tests