Updated style check and added filename checks