added possibility to dump memory