Commit title: File opening and closing

Description: Add the file file.c/.h to manage opening and closing for
files.
Already harcoded test both function