Fixed minor things in terms of opening non-existent files, etc.