add: JSON output add: integrity check - correct number of free pages check change: split to separate files