Fix classpath and saving template with name