Update Activity.java

Added onStop() and onDestroy() to log events. 
Also, statusFile and OutputStream are now global variables and closed only onDestroy() event.