fixed some issues with stderr and stdout. all is fine now