removed duplicate debug declaration after merging
fixed emacs compile command
added a bit of logging,

replaced stderr and stdout redirection