Sort command options alphabetically
Defensive programming around file operations
Added description and help text