Issue with deadlock remaining. Rest working. TODO: investigate behaviour of file_mapping constructors/destructors stack vs heap to refactor more sensibly