Small fix

Added resultCode=resultCanceled check in ActivityResult; made consoles
more robust