Closed open file, add support for relative paths