handle command failure; fix write_command_to_file
drwxr-xr-x - bin