URL getImgURL(String path){
        URL newURL = getRes(path);
        boolean failed = true;
        if (newURL != null) {
            try {
                if ((new File(GUI.class.getResource(path).toURI())).isFile()) {
                    failed = false;
                } else{
                    newURL = null;
                }
            } catch (URISyntaxException e) {
                log.print(LogType.Error, e);
                    newURL = null;
            } catch(IllegalArgumentException e){
                log.print(LogType.DebugError,"Error creating icon, or StudyBuddy is running from a .jar");
                failed=false;
            }
        }
        if (failed) {
            log.print(LogType.Error,"Error creating icon: " + path);
            //tempIcon = null;
        }
        return newURL;
    }