making dir and json repository handles consistent