handle FileNotFound exception and HTTP status code > 400 error by removing query part of the URL closes #6
avoid NullPointerException when user don't provide any command closes #7