Added verifying if latest version is being run

Added unit tests for that