don't throw errors if passed a callback, minor code restructure for 'deploy'