Added folder check in c file open