More error handling & a fix for ../relative/paths