Optimized loading script and added error message

Hi, 

I had problems using your script: No posts were loaded, because of a wrong regex in the script. I fixed that and added an error message string if some kind of error occures.

Best regards
Webastronaut