Improve swear file checking

Adds Error Log if file cannot be found also checks using joomla function
rather than php function