Check argument
Added toggle switch to debug mode