Added source file open and close