Opening files and some cosmetics