Added better error handling. Trying to implement user navigation on junit