Removed logging lines, added strtolower for extension comparison.