added better exception handling and logging to /sdcard
removed origin