implement get_runtime_dir()

- fixed warnings about unused variables and imports