Fixed the jvm setings and added double check for the appending