RmCommand.py: moved code out of try/except block