Added hook to load maps and fixed a filetype bug