Running command in sync