Put context and directory in initializer