Move the creation of MemoryManager. Throw exception instead of logging it