Add hash bang; more detailed usage; earlier error checking