Added is_plugged_in script for doing the obvious