Fixes in cleanup command
Added --error-output option for "check" action