Now notifying the user when any error is encountered.
 * Made application much more robust.
 * Synchronizing variables properly
 * If error occurs, stopping following code from executing