Update adminusSamples.py

Added logging, split into functions.