Optimization in log function and add File Inclusion Detection