Use rake task for syncing

Otherwise, whenever writes each call separately and doesn't load the
environment.