Refactor location, filename, and klabel attributes

**please review**
Why did you remove the try/catch?