Return error code as well as output
Add db dropping code, needs testing on dev03