If-else structure and silent running