fix import order
move two methods into new utils.py
add flush command
add command to upload csv