[ticket/11363] Fix a couple bugs and throw errors if the file not found

PHPBB3-11363