Added folder chekking for all the commands