added stderr handling for commands