fixed buggy error handling when loading files