Fixed crash on non-existing file, error enum added